package top.korori.service;

import com.baomidou.mybatisplus.extension.service.IService;
import top.korori.common.model.PageData;
import top.korori.common.model.PageParam;
import top.korori.entity.SysUser;
import top.korori.entity.bo.SysUserBo;
import top.korori.entity.vo.SysUserVo;

/**
 * 
 * 后台用户 服务类
 * 
 *
 * @author korori
 * @since
 */
public interface SysUserService extends IService<SysUser> {

    SysUser getByUserNameOrEmailOrPhone(String userName);

    /**
     * 分页查询用户数据
     * @param sysUser 用户数据
     * @param pageParam 分页参数
     * @return 分页数据结果
     */
    PageData<SysUser> list(SysUser sysUser, PageParam pageParam);

    /**
     * 添加用户
     * @param sysUserBo
     */
    void add(SysUserBo sysUserBo);

    /**
     * 修改用户
     * @param sysUserBo
     */
    void edit(SysUserBo sysUserBo);

    /**
     * 获取用户信息和关联角色id列表
     * @param userId
     * @return
     */
    SysUserVo get(Long userId);
}
